package com.qo.qsdk.model;

import com.qo.qsdk.config.QSDKLanguage;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class SDKInfoModel {

    private int debug;
    private int samsungDebug;
    private String gateway;
    private String version;
    private int gameId;
    private String lang;
    private QSDKLanguage currencyLang;
    private String facebookAppid;
    private String googleClientId;
    private String appsflyerKey;
    private AppleModel apple;
    private FirebaseModel firebase;

    private InitModel initModel;

    private String deviceId;
//    private String androidId;
//    private String adid;

//    public String getAndroidId() {
//        return androidId == null ? "" : androidId;
//    }
//
//    public void setAndroidId(String androidId) {
//        this.androidId = androidId;
//    }

//    public String getAdid() {
//        return adid == null ? "" : adid;
//    }
//
//    public void setAdid(String adid) {
//        this.adid = adid;
//    }


    public QSDKLanguage getCurrencyLang() {
        return currencyLang;
    }

    public void setCurrencyLang(QSDKLanguage currencyLang) {
        this.currencyLang = currencyLang;
    }


    public String getDeviceId() {
        return deviceId == null ? "" : deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public void setInitModel(InitModel initModel) {
        this.initModel = initModel;
    }

    public InitModel getInitModel() {
        return this.initModel == null ? new InitModel() : this.initModel;
    }

    public boolean isDebug() {
        return debug == 1;
    }

    public boolean isSamsungDebug() {
        return samsungDebug == 1;
    }

    public void setDebug(int debug) {
        this.debug = debug;
    }

    public String getGateway() {
        return gateway == null ? "" : gateway;
    }

    public void setGateway(String gateway) {
        this.gateway = gateway;
    }

    public String getVersion() {
        return version == null ? "" : version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public int getGameId() {
        return gameId;
    }

    public void setGameId(int gameId) {
        this.gameId = gameId;
    }

    public String getLang() {
        return lang == null ? "" : lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    public String getFacebookAppid() {
        return facebookAppid == null ? "" : facebookAppid;
    }

    public void setFacebookAppid(String facebookAppid) {
        this.facebookAppid = facebookAppid;
    }

    public String getGoogleClientId() {
        return googleClientId == null ? "" : googleClientId;
    }

    public void setGoogleClientId(String googleClientId) {
        this.googleClientId = googleClientId;
    }

    public String getAppsflyerKey() {
        return appsflyerKey == null ? "" : appsflyerKey;
    }

    public void setAppsflyerKey(String appsflyerKey) {
        this.appsflyerKey = appsflyerKey;
    }

    public AppleModel getApple() {
        return apple == null ? new AppleModel() : apple;
    }

    public void setApple(AppleModel apple) {
        this.apple = apple;
    }

    public FirebaseModel getFirebase() {
        return firebase == null ? new FirebaseModel() : firebase;
    }

    public void setFirebase(FirebaseModel firebase) {
        this.firebase = firebase;
    }



    public static class AppleModel {

        private String clientId;
        private String redirectUri;

        public String getClientId() {
            return clientId == null ? "" : clientId;
        }

        public void setClientId(String clientId) {
            this.clientId = clientId;
        }

        public String getRedirectUri() {
            return redirectUri == null ? "" : redirectUri;
        }

        public void setRedirectUri(String redirectUri) {
            this.redirectUri = redirectUri;
        }


    }

    class FirebaseModel {
        private String key;
        private String id;
        private String gcmSenderId;

        public String getKey() {
            return key == null ? "" : key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public String getId() {
            return id == null ? "" : id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getGcmSenderId() {
            return gcmSenderId == null ? "" : gcmSenderId;
        }

        public void setGcmSenderId(String gcmSenderId) {
            this.gcmSenderId = gcmSenderId;
        }
    }

    public boolean hasApple() {
        return getInitModel().getApple_login() == 1;
    }

    public boolean hasFacebook() {
        return getInitModel().getFacebook_login() == 1;
    }

    public boolean hasGoogle() {
        return getInitModel().getGoogle_login() == 1;
    }

    public boolean hasGuest() {
        return getInitModel().getGuest_login() == 1;
    }
}
